home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JProxy 1.1.0 / customers / customer-list.orig.jsp < prev    next >
Encoding:
Text File  |  2003-04-29  |  2.1 KB  |  85 lines

  1. <%@ page language="java" import="
  2.     com.jproxy.site.ejbeans.interfaces.*,
  3.     com.jproxy.site.*"
  4. %>
  5. <jsp:useBean id="ses" scope="session" class="com.jproxy.site.JSPSession"/>
  6. <%
  7. ses.request(pageContext);
  8. %>
  9.  
  10. <%
  11. ICustomer account = ses.getLogin();
  12. String customerName = account.getCustomerName();
  13. String customerID = account.getID();
  14. int totalLicenses = 0;
  15. Vector formulas = ses.session.getSaleFormulas(customerID);
  16. %>
  17.  
  18. <!-- HEADER -->
  19. <jsp:include page="../header.jsp" flush="true">
  20.   <jsp:param name="name" value="JProxy Tunnel Login"/>
  21. </jsp:include>
  22.  
  23. <center>
  24. <%=customerName%><br><br>
  25. My Customers:
  26. </center>
  27. <br><br>
  28.  
  29. <%
  30. Vector customers = ses.session.getCustomers(customerID);
  31. if(customers.size()>0)
  32. {
  33. %>
  34. <table  width=100% border=0>
  35.     <%
  36.     boolean isDark = false;
  37.     for(int i=0; i<customers.size(); i++)
  38.     {
  39.         String tableBorder = (isDark = !isDark) ? "tableRowDark" : "tableRowLight";
  40.         ICustomer customer = (ICustomer)customers.elementAt(i);
  41.     %>
  42.   <tr id=<%=tableBorder%>>
  43.     <td valign="top" width=130>
  44.       <a href="<%=JSPRes.path%>/main/customers/acedit.jsp?key=edit&customer-id=<%=customer.getID()%>">Customer Name:</A><br>
  45.       Customer Details:<br>
  46.       Purchased licenses:
  47.     </td>
  48.     <td valign="top" width=360>
  49.       <a href="<%=JSPRes.path%>/main/customers/acedit.jsp?key=edit&customer-id=<%=customer.getID()%>"><%=customer.getCustomerName()%></A><br>
  50.       <%=customer.getDetails()%>
  51.     </td>
  52.     <%
  53.     if(formulas.size()>0)
  54.     {
  55.     %>
  56.     <td valign="top">
  57.       <form method=POST action="<%=JSPRes.path%>/main/customers/buy.jsp">
  58.         <INPUT TYPE=HIDDEN NAME="customer-id" VALUE="<%=customer.getID()%>">
  59.         <input name=submit style="HEIGHT: 24px; WIDTH: 90px;" type=submit value="Buy Licenses">
  60.       </form>
  61.     </td>
  62.     <%
  63.     }
  64.     %>
  65.   </tr>
  66.     <%
  67.     }
  68.     %>
  69. </table>
  70. <%
  71. }
  72. %>
  73.  
  74. <br>
  75. <table  width=100% border=0>
  76.   <tr>
  77.     <td align="center">
  78.       <a href="<%=JSPRes.path%>/main/customers/acedit.jsp?key=new" alt="Create New Customer">New Customer</A>
  79.     </td>
  80.   </tr>
  81. </table>
  82.  
  83. <!-- FOOTER -->
  84. <jsp:include page="../footer.jsp" flush="true"/>
  85.